def verify_watermark(model_with_watermark, expected_watermark):
    """
    验证模型中的水印
    :param model_with_watermark: 带水印的模型
    :param expected_watermark: 预期的水印
    :return: 是否验证通过
    """
    return model_with_watermark[-1] == expected_watermark

# 示例
model_with_watermark = np.array([1, 2, 3, 42])
expected_watermark = 42
is_verified = verify_watermark(model_with_watermark, expected_watermark)
print(f"Is verified: {is_verified}")